#define  _CRT_SECURE_NO_WARNINGS   1
#include "tree.h"

TreeNode* CreatTree()
{
	TreeNode* nodeA = BuyNode('A');
	TreeNode* nodeB = BuyNode('B');
	TreeNode* nodeC = BuyNode('C');
	TreeNode* nodeD = BuyNode('D');
	TreeNode* nodeE = BuyNode('E');
	TreeNode* nodeF = BuyNode('F');

	nodeA->left = nodeB;
	nodeA->right = nodeC;
	nodeB->left = nodeD;
	nodeC->left = nodeE;
	nodeC->right = nodeF;

	return nodeA;
}

int main()
{
	TreeNode* root = CreatTree(); 
	//TreePrev(root);
	//TreeMid(root);
	//TreeBack(root);
	//int m = TreeSize(root);
	//int m = TreeLeafSize(root);
	//int m=TreeKSize( root,3);
	int m=TreeDepth(root);
	printf("%d\n", m);
	TreeDestroy(&root);
	return 0;
}